package de.tudarmstadt.ukp.wikisniffer.userstudy.gui.rtool;

import java.io.IOException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import de.tudarmstadt.ukp.wikisniffer.userstudy.Client;
import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.intro.TextGui;
import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.intro.TextGuiWithoutButton;
import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.questions.util.LearnTimer;
import de.tudarmstadt.ukp.wikisniffer.userstudy.gui.rtool.util.RToolTimer;

public class RToolTextGui extends TextGuiWithoutButton
{
	private ExecutorService service;
	RToolTimer timer;
	
	@Override
	public void open()
	{
		super.open();
		
		timer = new RToolTimer(Client.timeoufInMinutesForRTool);
		service = Executors.newCachedThreadPool();
		service.execute(timer);

	}
	
	@SuppressWarnings("deprecation")
	@Override
	public void close(){
		super.close();
		service.shutdownNow();
	}	
}
